close
close
Your Network of Tomorrow
Your Network of Tomorrow
Plan your path toward a faster, more secure, and more resilient network designed for the applications and users that you support.
          Experience Netskope
          Get Hands-on With the Netskope Platform
          Here's your chance to experience the Netskope One single-cloud platform first-hand. Sign up for self-paced, hands-on labs, join us for monthly live product demos, take a free test drive of Netskope Private Access, or join us for a live, instructor-led workshops.
            A Leader in SSE. Now a Leader in Single-Vendor SASE.
            A Leader in SSE. Now a Leader in Single-Vendor SASE.
            Netskope debuts as a Leader in the Gartner® Magic Quadrant™ for Single-Vendor SASE
              Securing Generative AI for Dummies
              Securing Generative AI for Dummies
              Learn how your organization can balance the innovative potential of generative AI with robust data security practices.
                Modern data loss prevention (DLP) for Dummies eBook
                Modern Data Loss Prevention (DLP) for Dummies
                Get tips and tricks for transitioning to a cloud-delivered DLP.
                  Modern SD-WAN for SASE Dummies Book
                  Modern SD-WAN for SASE Dummies
                  Stop playing catch up with your networking architecture
                    Understanding where the risk lies
                    Advanced Analytics transforms the way security operations teams apply data-driven insights to implement better policies. With Advanced Analytics, you can identify trends, zero in on areas of concern and use the data to take action.
                        The 6 Most Compelling Use Cases for Complete Legacy VPN Replacement
                        The 6 Most Compelling Use Cases for Complete Legacy VPN Replacement
                        Netskope One Private Access is the only solution that allows you to retire your VPN for good.
                          Colgate-Palmolive Safeguards its "Intellectual Property” with Smart and Adaptable Data Protection
                          Colgate-Palmolive Safeguards its "Intellectual Property” with Smart and Adaptable Data Protection
                            Netskope GovCloud
                            Netskope achieves FedRAMP High Authorization
                            Choose Netskope GovCloud to accelerate your agency’s transformation.
                              Let's Do Great Things Together
                              Netskope’s partner-centric go-to-market strategy enables our partners to maximize their growth and profitability while transforming enterprise security.
                                Netskope solutions
                                Netskope Cloud Exchange
                                Netskope Cloud Exchange (CE) provides customers with powerful integration tools to leverage investments across their security posture.
                                  Netskope Technical Support
                                  Netskope Technical Support
                                  Our qualified support engineers are located worldwide and have diverse backgrounds in cloud security, networking, virtualization, content delivery, and software development, ensuring timely and quality technical assistance
                                    Netskope video
                                    Netskope Training
                                    Netskope training will help you become a cloud security expert. We are here to help you secure your digital transformation journey and make the most of your cloud, web, and private applications.

                                      The Importance of a Machine Learning-Based Source Code Classifier

                                      Aug 08 2022

                                      Co-authored by Yihua Liao and Yi Zhang

                                      This is the fifth in a series of articles focused on AI/ML.  

                                      Source code is a critical part of an organization’s intellectual property and digital assets. As more and more centralized source code repositories are moving to the cloud, it is imperative for organizations to use the right security tools to safeguard their source code.

                                      In December 2020, a software engineer started working at Tesla and immediately began uploading the company’s source code files to his personal Dropbox account. Tesla didn’t confront him about his alleged theft until January 6, 2021. In March 2022, Microsoft confirmed that the Lapsus$ hacking group had compromised an employee account and stolen the company’s source code from Bing, Bing Maps and Cortana. These are just some of the latest examples of sensitive data leaking in the form of source code. 

                                      Challenges of source code detection

                                      It is not an easy task to determine programmatically whether a text document is source code or not. First of all, there are many different programming languages, and there is no specific pattern to describe what the source code should look like. As a result, it is impossible to come up with some regular expressions to match source code files with acceptable accuracy. 

                                      Furthermore, programming languages are different from natural languages. Therefore, many popular pre-trained NLP (Natural Language Processing) models, such as GPT, BERT, and XLNet, which have shown great results in other document classification problems, are not effective in identifying source code. For example, some terms, punctuations, and symbols, such as “str”,  “def”, “==”, “>=”, and “:”, are not included in the vocabularies of most pre-trained models. However, they are widely used and carry significant meanings in source code. On the other hand, some words, such as “return” and “switch”, are used in both natural English and programming languages, yet with very different semantic meanings. 

                                      The Netskope source code classifier

                                      To address these challenges, we have developed a machine learning (ML) based source code classifier to detect source code files, as part of Netskope’s Advanced DLP (data loss prevention) solution. The source code classifier takes advantage of a proprietary code vocabulary, which consists of 80,000 common phrases in source code. The code vocabulary was extracted from a large corpus of source code sample files, covering more than 20 of the most popular programming languages. 

                                      We have generated machine learning features based on the code vocabulary and trained a decision tree-like source code classifier. Compared to the model that is refined from a pre-trained language model, the source code classifier achieves 92% reduction in false positives while keeping the source code detection rate at 99%.   

                                      The source code classifier scans our customers’ network traffic and looks for source code files inline. Its runtime in production is just a few milliseconds. This allows customers to enforce their source code policy and prevent data exfiltration in real time. 

                                      More about Netskope DLP

                                      Netskope’s award-winning DLP solution helps an organization protect the sensitive data it owns or its employees process. Netskope understands the context of cloud and web access, including the user, device, app, instance, activity, and content involved, to accurately identify violations and data risks. From there, it can then allow, challenge, block, quarantine, encrypt, or apply a legal hold, as well as integrate with on-premises solutions to prevent data loss and exposure. Netskope performs accurate inspection through 3,000+ out-of-the-box data identifiers, 25 predefined legal and regulatory compliance templates, and various matching techniques (proximity expression, custom regex and dictionaries, file fingerprinting, exact data matching, and so on).

                                      Netskope Advanced DLP includes machine learning based file classification that provides a fast and effective way to identify sensitive documents, enabling users to work inline with granular real-time DLP policy controls. ML classifiers are able to accurately classify documents into different categories, including source code, tax forms, patent documents, and other sensitive legal and financial documents, without the need to identify specific pieces of sensitive information contained in those files. 

                                      For more information, please check out our white paper Protecting Data Using Machine Learning.

                                      author image
                                      Yihua Liao
                                      Dr. Yihua Liao is the Head of AI Labs at Netskope. His team develops cutting-edge AI/ML technology to tackle many challenging problems in cloud security.
                                      Dr. Yihua Liao is the Head of AI Labs at Netskope. His team develops cutting-edge AI/ML technology to tackle many challenging problems in cloud security.

                                      Stay informed!

                                      Subscribe for the latest from the Netskope Blog